package org.zbclan.bf2.rcon.home.client.event;

import org.zbclan.bf2.rcon.common.shared.GamePlayObject;

import com.google.gwt.event.shared.GwtEvent;

public class GamePlayObjectReadyEvent extends
		GwtEvent<GamePlayObjectReadyEventHandler> {

	public static Type<GamePlayObjectReadyEventHandler> TYPE = new Type<GamePlayObjectReadyEventHandler>();

	private GamePlayObject gpo;

	public GamePlayObjectReadyEvent(GamePlayObject gpo) {
		this.gpo = gpo;
	}

	@Override
	protected void dispatch(GamePlayObjectReadyEventHandler handler) {
		handler.onGamePlayObjectReady(gpo);
	}

	@Override
	public Type<GamePlayObjectReadyEventHandler> getAssociatedType() {
		return TYPE;
	}

	public GamePlayObject getGamePlayObject() {
		return gpo;
	}

}
